package com.wkbb.sports.mapper;

import com.wkbb.common.base.BaseMapper;
import com.wkbb.sports.model.StudentArena;
import com.wkbb.sports.model.StudentArenaTeam;
import com.wkbb.sports.model.StudentArenaTeamStu;
import com.wkbb.sports.model.StudentArenaTrain;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface StudentArenaMapper extends BaseMapper<StudentArena> {
    int addTeamNum(Long id);
    int updateTeam(StudentArenaTeam info);
    int insertTeam(StudentArenaTeam info);
    int getTeamCount(Long id);
    List<StudentArenaTeam> findTeamList(Map<String, Object> params);
    StudentArenaTeam findTeam(Map<String, Object> params);
    StudentArenaTeam getTeamStatistical(Map<String, Object> params);

    int insertTeamStu(StudentArenaTeamStu info);
    List<StudentArenaTeamStu> findTeamStuList(Map<String, Object> params);
    void insertTrain(StudentArenaTrain train);

    int getPlayerCount(Map<String, Object> params);
    int getPlayerChallengeCount(Map<String, Object> params);

    Integer getTeamStuCount(Map<String, Object> params);
    List<StudentArenaTrain> getTeamStuList(Map<String, Object> params);
    List<StudentArenaTrain> getStuList(Long arenaId);

    StudentArena getChampionInfoType1(StudentArena info);
    StudentArena getChampionInfoType2(StudentArena info);

    List<StudentArena> getMyListByPage(Map<String, Object> params);
    List<StudentArenaTrain> getStuChallengeList(Map<String, Object> params);

    StudentArenaTrain getStuTrain(@Param("arenaId")Long arenaId, @Param("studentId")Long studentId);

    boolean isFamily(@Param("userId")Long userId, @Param("studentId")Long studentId);

    void delArenaTeamStu(Map<String, Object> params);
    void delArenaTrain(Map<String, Object> params);
}
